home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / quicktimeintro / createmovie / start code / qtflatten.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-06  |  1.2 KB  |  38 lines

  1. #include <Movies.h>
  2.  
  3. #include "QTUtilities.h"
  4. #include "QTFlatten.h"
  5. #include "CreateMovie.h"
  6. #include "ComFramework.h"
  7.  
  8. /************************************************************
  9. *                                                           *
  10. *                                                            *
  11. *  QTSave_FlattenMovie                                        *                    
  12. *  Save and flatten a movie resource into a file.            *
  13. *                                                           *
  14. *                                                           *
  15. *************************************************************/
  16.  
  17. OSErr QTSave_FlattenMovie (Movie theMovie, FSSpec *myFile)
  18. {
  19.     Movie    aMovie = NULL;
  20.     OSErr    myErr = noErr;
  21.  
  22.     // The FlattenMovieData function creates a new movie file and creates a new movie
  23.     // that contains all of its movie data.
  24.     // NOTE: Unlike the FlattenMovie, this function does not add the new movie resource
  25.     // to the new movie file. Instead, the FlattenMovieData function returns the new
  26.     // movie to your application. Your application must dispose of the returned movie.
  27.             
  28. // Step 1.
  29. // Insert FlattenMovieData.clp here...
  30.         
  31.         myErr = GetMoviesError();
  32.         CheckError( myErr, "FlattenMovie error" );
  33.         
  34.         if (aMovie != NULL)
  35.             DisposeMovie(theMovie);
  36.             
  37.     return myErr;
  38. }